<!DOCTYPE html>
<%@ page language="java" contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>course-work-management</title>
    <link rel="stylesheet" type="text/css" href="/course-work-management/css/lib/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/course-work-management/css/lib/upload-file-btn.css">
    <link rel="stylesheet" type="text/css" href="/course-work-management/css/lib/bootstrap-formhelpers.css">
    <link rel="stylesheet" type="text/css" href="/course-work-management/css/navbar.css">
    <link rel="stylesheet" type="text/css" href="/course-work-management/css/user-navbar.css">
    <link rel="stylesheet" type="text/css" href="/course-work-management/css/teacher.css">
    <link rel="icon" href="/course-work-management/img/logo.png" />
</head>

<body>
   <nav class="navbar navbar-default">
		<div class="container">
			<div class="navbar-header">
				<ul class="breadcrumb">
                    <li class="active">课程作业管理</li>
                    <li class="active">教师</li>
                    <li class="active">作业</li>
                </ul>
			</div>
			<ul class="nav navbar-nav navbar-right">
				<li><a href="#" class="dropdown-toggle" data-toggle="dropdown"> 
						<span class="glyphicon glyphicon-user"></span>
						<c:if test="${not empty userName}">${userName}</c:if>
						<span class="caret"></span>
					</a>
					<ul class="dropdown-menu">
						<li><a href="/course-work-management/teacher/work"> <img src="/course-work-management/img/work.png">作业</a></li>
						<li><a href="/course-work-management/teacher/student"> <img src="/course-work-management/img/student.png">学生</a></li>
					</ul>
				</li>
				<li><a href="/course-work-management/logout"> <span class="glyphicon glyphicon-log-out"></span>注销</a></li>
			</ul>
		</div>
		</div>
	</nav>
    <div class="container">
    	<!-- alert message when deleting course or teacher work -->
        <div class="row">
            <div class="col-md-4">
                <div class="panel panel-default">
                    <div class="panel-heading" id="courses">
                    	
                        <select class="form-control" style="width: 70%; display: inline-block;">
                        	<!--  display course options-->
                        </select>
                        <button class="btn btn-primary pull-right" style="margin-left: 5px;" data-toggle="modal" data-target="#addCourseModal" data-tooltip="true" data-placement="top" data-original-title="添加新的课程">
                            <span class="glyphicon glyphicon-plus"></span>
                        </button>
                        <button class="btn btn-danger pull-right" data-toggle="modal" data-target="#deleteCourseModal" data-tooltip="true" data-placement="top" data-original-title="删除当前课程">
                            <span class="glyphicon glyphicon-minus"></span>
                        </button>
                    </div>
                    <div class="panel-body" style="height: 480px; overflow: auto;" id="teacherWorks">
                        <div class="list-group">
                        	<!-- display teacher works -->
                        	<div></div>
                            <botton class="btn btn-primary" style="width: 100%;" data-toggle="modal" data-target="#addTeacherWorkModal">
                                <span class="glyphicon glyphicon-plus" style="margin-right: 10px;"></span> 布置课程作业
                            </botton>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-8">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <ol class="breadcrumb" style="font-size: 1.2em; margin-bottom: 0px; padding: 5px;" data-id="" id="workPanelHeading">
                            <li></li>
                            <li></li>
                            <button class="btn btn-primary pull-right" style="margin-top: -5px; margin-left: 5px; display: none" data-tooltip="true" data-placement="top" data-original-title="更新学生作业成绩">
                                <span class="glyphicon glyphicon-floppy-saved" style="margin-right: 5px;"></span>保存
                            </button>
                            <button class="btn btn-danger pull-right" style="margin-top: -5px; display: none" data-toggle="modal", data-target="#deleteTeacherWorkModal" data-tooltip="true" data-placement="top" data-original-title="删除当前布置的课程作业要求以及其相关的学生作业">
                                <span class="glyphicon glyphicon-floppy-remove" style="margin-right: 5px;"></span>删除
                            </button>
                        </ol>
                    </div>
                    <div class="panel-body">
                        <ul class="nav nav-tabs">
                            <li class="active"><a href="#tabContentTeacherWork" data-toggle="tab">作业要求</a></li>
                            <li><a href="#tabContentStudentWork" data-toggle="tab">学生作业</a></li>
                        </ul>
                        <div class="tab-content">
                            <div id="tabContentTeacherWork" class="tab-pane fad in active" style="height: 400px; overflow: auto;">
                                <table class="table table-hover" style="margin-top: 10px;">
                                <!-- display current teacher work -->
                                </table>
                            </div>
                            <div id="tabContentStudentWork" class="tab-pane fad" style="height: 400px; overflow: auto;">
                                <table class="table table-condensed" style="margin-top: 10px;">
                                    <thead>
                                        <tr>
                                            <th>学号</th>
                                            <th>姓名</th>
                                            <th>上交日期</th>
                                            <th>作业附件</th>
                                            <th>成绩</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <!-- display current student works -->
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <p class="text-center"><em><strong>Powered by LVZY.</strong></em></p>
    </div>
    
    <!-- Add Course Modal HTML -->
    <div id="addCourseModal" class="modal fade">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal" aria-hidden="true">x</button>
                    <h4 class="modal-title">新课程</h4>
                </div>
                <div class="modal-body">
                	<form action=""> 
	                    <div class="form-group">
	                        <label class="control-label">课程名称:</label>
	                        <input type="text" class="form-control" name="courseName">
	                    </div>
	                    <div class="form-group">
	                        <label class="control-label">课程编号:</label>
	                        <select class="form-control" name="courseNo" >
	                            <option value="A">A</option>
	                            <option value="B">B</option>
	                            <option value="C">C</option>
	                            <option value="D">D</option>
	                        </select>
	                    </div>
	                 </form>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-warning" data-dismiss="modal">取消</button>
                    <button class="btn btn-primary">保存</button>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Delete Course Modal HTML -->
    <div id="deleteCourseModal" class="modal fade">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal" aria-hidden="true">x</button>
                    <h4 class="modal-title">删除课程</h4>
                </div>
                <div class="modal-body">
            		<p>确定要删除此课程？</p>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-warning" data-dismiss="modal">否</button>
                    <button class="btn btn-primary">是</button>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Add Teacher Work Modal HTML -->
    <div id="addTeacherWorkModal" class="modal fade">
        <div class="modal-dialog modal-md">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal" aria-hidden="true">x</button>
                    <h4 class="modal-title">新课程作业</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">标题:</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" placeholder="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">内容:</label>
                            <div class="col-sm-10">
                                <textarea class="form-control" rows="6" placeholder=""></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">附件:</label>
                            <div class="col-sm-10">
                                <div class="input-group">
                                    <input type="text" class="form-control" disabled="true" style="cursor: default;" placeholder=""/>
                                    <span class="input-group-btn">
                                        <button class="btn btn-primary btn-file" type="button">
                                            <span class="glyphicon glyphicon-folder-open"></span>
                                            <input type="file">
                                        </button>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">期限:</label>
                            <div class="col-sm-4">
                                <div class="bfh-datepicker" data-format="y-m-d" data-date="today"></div>
                            </div>
                            <div class="col-sm-3" style="margin-left: -15px;">
                                <div class="bfh-timepicker" data-time="now"></div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-warning" data-dismiss="modal">取消</button>
                    <button class="btn btn-primary">保存</button>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Delete Teacher work Modal HTML -->
    <div id="deleteTeacherWorkModal" class="modal fade">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal" aria-hidden="true">x</button>
                    <h4 class="modal-title">删除课程作业</h4>
                </div>
                <div class="modal-body">
            		<p>确定要删除此课程以及与其相关的所有学生作业？</p>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-warning" data-dismiss="modal">否</button>
                    <button class="btn btn-primary">是</button>
                </div>
            </div>
        </div>
    </div>
    
    <script src="/course-work-management/js/lib/jquery-1.11.1.js"></script>
    <script src="/course-work-management/js/lib/bootstrap.js"></script>
    <script src="/course-work-management/js/lib/bootstrap-formhelpers.js"></script>
    <script src="/course-work-management/js/lib/time-format.js"></script>
    <script src="/course-work-management/js/container.js"></script>
    <script src="/course-work-management/js/teacher-work.js"></script>
</body>

</html>